package com.sdry.approval.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sdry.approval.entity.LeaveMan;
import com.sdry.approval.entity.LeaveRequest;

import java.util.List;

/**
 * 请假申请
 * @author chenbin
 * @date 2020年2月21日16:02:02
 * @version 1.0
 */
public interface LeaveRequestService extends IService<LeaveRequest> {
    /**
     * 添加
     * @param leaveRequest 请假申请
     * @param userId
     * @return
     */
    boolean add(LeaveRequest leaveRequest, String[] userId);

    /**
     * 查询所有的审批人员
     * @param requestId
     * @param requestType
     * @return
     */
    List<LeaveMan> queryLeaveManList(Long requestId, String requestType);

    /**
     * 同意审批
     * @param requertType 审批类型
     * @param requestId 审批ID
     * @param proposal
     * @return
     */
    boolean approval(String requertType, Long requestId, String proposal);
}
